using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace TidhiGanitam.DataModel
{
    public class ArkahaRoutineItem
    {
        private int m_Year;
        DateTime m_Date;
        private int m_SNo;
        RaviRoutineItem m_RaviRoutine;
        DinamuRoutineItem m_DinamuRoutine;
        Rasi m_ArkahaTime;
        //double m_CurrentNakshatramuIndex;
        //double m_CurrentPadamuIndex;
        ArkahaDetails m_ArkahaDetails;

        public int Bhagam
        {
            get { return m_SNo; }
        }
        public DateTime Date
        {
            get { return m_Date; }
        }
        public ArkahaDetails ArkahaDetails
        {
            get
            { return m_ArkahaDetails; }
        }
        //public double CurrentNakshatramuIndex
        //{
        //    get
        //    { return m_CurrentNakshatramuIndex; }
        //    set
        //    { m_CurrentNakshatramuIndex = value; }

        //}
        //public double CurrentPadamuIndex
        //{
        //    get
        //    { return m_CurrentPadamuIndex; }
        //    set
        //    { m_CurrentPadamuIndex = value; }

        //}
        //public string Nakshatramu
        //{
        //    get
        //    { return Constants.Nakshatramu[Convert.ToInt32(m_CurrentNakshatramuIndex)]; }
        //}
        //public string Padamu
        //{
        //    get
        //    { return Constants.Padamulu[Convert.ToInt32(m_CurrentPadamuIndex)]; }
        //}
        //public Rasi ArkahaTime
        //{
        //    get
        //    { return m_ArkahaTime; }
        //}

        public ArkahaRoutineItem(int SNo, int Year, DateTime Date, RaviRoutineItem RaviRoutine,
            DinamuRoutineItem DinamuRoutine)
        {
            m_SNo = SNo;
            m_Year = Year;
            m_Date = Date;
            //m_CurrentNakshatramuIndex = 0d;
            //m_CurrentPadamuIndex = 0;
            m_RaviRoutine = RaviRoutine;
            m_DinamuRoutine = DinamuRoutine;
            //m_ArkahaTime = new Rasi();
            m_ArkahaDetails = new ArkahaDetails();

        }
        public void Calculate(RaviRoutineItem PreviousRaviRoutine, ref double Direction)
        {
            m_ArkahaDetails = Constants.GetArkaha(m_RaviRoutine, PreviousRaviRoutine, ref Direction, m_DinamuRoutine);

        }
        public string GetArkahaDetailsString()
        {
            string retString = m_ArkahaDetails.GetArkahaDetailsString();
            return retString;
        }
    }
}
